#include "SMPPBroadcastContentTypeInfo.hpp"

using namespace smpp::pdu;

BroadcastContentTypeInfo::BroadcastContentTypeInfo(
const octetString &nValue):
TLV(TLVtags::TAG_BROADCAST_CONTENT_TYPE_INFO,nValue.size()),
_Value(nValue){}

BroadcastContentTypeInfo::BroadcastContentTypeInfo(
const BroadcastContentTypeInfo &nBroadcastContentTypeInfo):
TLV(nBroadcastContentTypeInfo),
_Value(nBroadcastContentTypeInfo.getValue()){}

bool BroadcastContentTypeInfo::operator ==(
	const BroadcastContentTypeInfo &nBroadcastContentTypeInfo) const{
	return (TLV::operator == (nBroadcastContentTypeInfo) && 
			_Value == nBroadcastContentTypeInfo.getValue());
}

bool BroadcastContentTypeInfo::operator !=(
	const BroadcastContentTypeInfo &nBroadcastContentTypeInfo) const{
	return !this->operator == (nBroadcastContentTypeInfo);
}

BroadcastContentTypeInfo &BroadcastContentTypeInfo::operator = (
	const BroadcastContentTypeInfo &nBroadcastContentTypeInfo){
	if(*this == nBroadcastContentTypeInfo)
		return *this;
	TLV::operator = (nBroadcastContentTypeInfo);
	_Value = nBroadcastContentTypeInfo.getValue();
	return *this;
}

void BroadcastContentTypeInfo::setValue(const octetString &nValue){
	_Value = nValue;
}

const octetString &BroadcastContentTypeInfo::getValue() const{
	return _Value;
}
